package com.iterator.exceptionhandler;
import com.iterator.bean.wechat.dhy.ResultVO;
import com.iterator.exceptions.ArgsException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class ArgsExceptionHandler {
    @ExceptionHandler(ArgsException.class)
    @ResponseBody
    public ResultVO handlerAuthorizationException(ArgsException e){
        return ResultVO.error(200, e.getMessage());
    }
}
